package com.ceshiren.chnjx.wework.page.contact;

import com.ceshiren.chnjx.wework.page.BasePage;
import io.appium.java_client.AppiumDriver;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

/**
 * @author JJJJ
 * @Title:
 * @date 2021/11/6下午4:39
 * @Description:
 */
public class AddMemberPage extends BasePage {
    private By nameInput = By.id("ber");
    private By phoneInput = By.id("gcr");
    private By saveBtn = By.id("alp");
    public AddMemberPage(AppiumDriver driver) {
        super(driver);
    }

    /**
     * 添加成员
     * @param name 成员名
     * @param phone 成员手机号
     * @return
     */
    public ContactPage addMember(String name, String phone){
        sendDate(nameInput,name).sendDate(phoneInput,phone).click(saveBtn);
        return new ContactPage(driver);
    }
}
